{% extends base_template %}

{% block title %}Set a password{% endblock %}

{% block extra_head %}
<style type="text/css">
input.openid {
  background: url({{ logo }}) no-repeat; 
  background-position: 0 50%;
  padding-left: 16px;
  width: 20em;
}
div.field-wrapper {
    clear: both;
    margin-bottom: 0.5em;
    width: 32em;
}
.errors input {
    background-color: pink;
}
div.field-wrapper label {
    width: 9em;
    float: left;
    clear: left;
}
div.field-wrapper input {
    width: 20em;
}
input#id_username {
    width: 12em;
}
</style>
{% endblock %}

{% block content %}
<h1>Set a password</h1>

{% if message %}
<p>{{ message }}</p>
{% endif %}

<p>You can optionally set a password on your account, to provide an alternative mechanism of logging in.</p>

<form action="{{ action }}" method="POST">
{% if form.old_password %}
{% with form.old_password as field %}{% include "django_openid/_register_form_field.html" %}{% endwith %}
{% endif %}
{% with form.password as field %}{% include "django_openid/_register_form_field.html" %}{% endwith %}
{% with form.password2 as field %}{% include "django_openid/_register_form_field.html" %}{% endwith %}
<p><input type="submit" value="Set password"></p>
</form>

{% endblock %}
